/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package questionário;

import java.util.ArrayList;
import java.util.Scanner;

/**
 *
 * @author Lucas
 */
public class Controle {

    ArrayList<Questoes> list = new ArrayList<>();
    Questoes entrada = new Questoes();

    public void novaQuestaoO() {
        Scanner scanner = new Scanner(System.in);
        System.out.println("Cabeçalho");
        entrada.setCabecalho(scanner.nextLine());
        System.out.println("Alternativa A");
        entrada.setAlternativaA(scanner.nextLine());
        System.out.println("Alternativa B");
        entrada.setAlternativaB(scanner.nextLine());
        System.out.println("Alternativa C");
        entrada.setAlternativaC(scanner.nextLine());
        System.out.println("Alternativa D");
        entrada.setAlternativaD(scanner.nextLine());
        list.add(entrada);
    }

    void novaQuestaoD() {
        Scanner scanner = new Scanner(System.in);
        System.out.println("Cabeçalho");
        entrada.setCabecalho(scanner.nextLine());
        list.add(entrada);
    }

    public void imprimeQuestoes() {
        for (int i = 0; i < list.size(); i++) {
            System.out.println("");
            System.out.println("");
            System.out.print("Questão " + i);
            System.out.println(list.get(i).getCabecalho());
            if (list.get(i).getAlternativaA() != null && list.get(i).getAlternativaA().length() != 0) {
                System.out.print("Alternativa A");
                System.out.println(list.get(i).getAlternativaA());
                System.out.print("Alternativa B");
                System.out.println(list.get(i).getAlternativaB());
                System.out.print("Alternativa C");
                System.out.println(list.get(i).getAlternativaC());
                System.out.print("Alternativa D");
                System.out.println(list.get(i).getAlternativaD());
            }
            else System.out.println("R.:");
            System.out.println("");
            System.out.println("");
        }
    }
}
